Skip to content

fix: structured clone can't be used for all properties of OlFeature#1003

Merged
ahennr merged 1 commit intomainfrom
fix/clone
Mar 11, 2026
Merged

fix: structured clone can't be used for all properties of OlFeature#1003
ahennr merged 1 commit intomainfrom
fix/clone

Conversation

@ahennr
Copy link
Member

@ahennr ahennr commented Mar 10, 2026

Replace structuredClone with _cloneDeep from Lodash to avoid DataCloneError exceptions caused by non‑cloneable objects (e.g. feature instances with methods like handleGeometryChanged_). Lodash’s deep clone can handle these objects more gracefully in our use case and prevents runtime failures when fetching coordinate information.

Plz review @terrestris/devs

@ahennr ahennr merged commit d7d6d46 into main Mar 11, 2026
2 checks passed
@ahennr ahennr deleted the fix/clone branch March 11, 2026 14:32
@github-actions
Copy link

🎉 This PR is included in version 12.4.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants